import java.util.Arrays;
import java.util.Scanner;
public class test {

    //数组转换
    //"[1, 2, 3]"
    public static void toString(int[] array) {
        for(int i = 0; i < array.length; i++) {
            if(i == 0) {
                System.out.print("\"[");
            }
            System.out.print(array[i]);
            if(i != array.length - 1) {
                System.out.print(",");
            }else {
                System.out.print("]\"");
            }

        }
    }

    //数组拷贝
    public static int[] copyOf(int[] array) {
        int[] copy = new int[array.length];
        for(int i = 0; i < array.length; i++) {
            copy[i] = array[i];
        }
        return copy;
    }

    //二分查找
    public static void bin_Search(int[] array, int key) {
        int left = 0;
        int right = array.length - 1;
        while(left <= right) {
            int mid = (left + right) / 2;
            if(array[mid] > key) {
                right = mid - 1;
            }else if(array[mid] < key) {
                left = mid + 1;
            }else {
                System.out.println("找到了！");
                break;
            }
        }
        if(left > right){
            System.out.println("没有找到！");
        }
    }


    //判断是否有序
    public static boolean is_Int(int[] array) {
        int count = 0;
        for(int i = 0; i < array.length - 1; i++) {
            if(array[i] < array[i + 1]) {
                count++;
            }
        }
        if(count == array.length - 1) {
            return true;
        }else {
            return false;
        }
    }


    //冒泡排序
    public static void bubble_sort(int[] array) {
        int i = 0;
        for(i = 0; i < array.length - 1; i++) {
            int flag = 0;
            for(int j = 0; j < array.length - 1 - i; j++) {
                if(array[j] > array[j + 1]) {
                    int tmp = array[j];
                    array[j] = array[j + 1];
                    array[j + 1] = tmp;
                    flag = 1;
                }
            }
            if(flag == 0) {
                break;
            }
        }
    }
    public static void main(String[] args) {
        int[] array = {1,2,3,4,5,6,7};
//        bubble_sort(array);
//        System.out.println(Arrays.toString(array));
//        System.out.println(is_Int(array));
//        bin_Search(array, 9);
//        System.out.println(Arrays.toString(copyOf(array)));
        toString(array);
    }


    //创建数组并设初始值
    public static void assignment(int[] array, int n) {
        for(int i = 0; i < 100; i++) {
            array[i] = i + 1;
        }
    }
    public static void main5(String[] args) {
        int[] array = new int[100];
        assignment(array, 100);
        for(int x : array) {
            System.out.print(x + " ");
        }
        System.out.println();
    }

    //打印数组中的每一个元素
    public static void printArray(int[] array) {
        for(int x : array) {
            System.out.print(x + " ");
        }
        System.out.println();
    }

    //变换元素
    public static void transform(int[] array, int n) {
        for(int i = 0; i < n; i++) {
            array[i] *= 2;
        }
    }

    //求一个数组的和
    public static int sum(int[] array) {
        int sum = 0;
        for(int x : array) {
            sum += x;
        }
        return sum;
    }

    //求数组的平均值
    public static double avg(int[] array, int n) {
        double sum = 0.0;
        for(int x : array) {
            sum += x;
        }
        return sum / n;
    }
    public static void main4(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] array = new int[n];
        for(int i = 0; i < n; i++) {
            array[i] = scanner.nextInt();
        }
        printArray(array);
//        transform(array, n);
//        for(int x : array) {
//            System.out.print(x + " ");
//        }
//        System.out.println();
//        System.out.println(avg(array, n));
//        System.out.println(sum(array));
    }

    //青蛙跳台阶
    public static int fib(int n) {
        if(n < 4) {
            return n;
        }else {
            return fib(n - 1) + fib(n - 2);
        }
    }
    public static void main3(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println(fib(n));
    }


    //求两个或三个数的和
    public static int add(int a, int b) {
        return a + b;
    }
    public static int add(int a, int b, int c) {
        return a + b + c;
    }

    public static void main2(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        System.out.println(add(a, b));
        System.out.println(add(a, b, c));
    }

   //找出两个或三个数的最大值
    public static int findMax(int a, int b) {
        return a > b ? a : b;
    }
    public static int findMax(int a, int b, int c) {
        int d = a > b ? a : b;
        return d > c ? d : c;
    }
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        System.out.println(findMax(a, b));
        System.out.println(findMax(a, b, c));
    }
}
